Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle libzmq as an Extension if it isn't found #205

Merged
merged 32 commits into from
May 24, 2012
Merged

Conversation

minrk
Copy link
Member

@minrk minrk commented May 18, 2012

The code to do this is largely from pyzmq-static, but with some important differences:

  • libzmq as an extension is optional
  • libzmq/uuid sources are downloaded as-needed
  • platform.hpp is attempted by ./configure before falling back on
    shipped versions (also from pyzmq-static)

This should make pyzmq pip-installable without libzmq present, and remove the need for the pyzmq-static project to exist separately from pyzmq itself.

closes #128

@minrk
Copy link
Member Author

minrk commented May 18, 2012

The buildutils.py script is split into modules in buildutils, and largely unchanged. New code is almost entirely in the configure command object, and buildutils/bundle.py

@minrk
Copy link
Member Author

minrk commented May 18, 2012

If anyone wants to test this out, you can run:

pip install --upgrade https://github.com/minrk/pyzmq/tarball/bundle

Which should build on just about any system (only requirement is Cython, since it's from git rather than an sdist). I also made an sdist, which I will leave up for a bit of testing, so you can try:

pip install --upgrade http://ptsg.berkeley.edu/~minrk/pyzmq-2.2dev.tar.gz

while that file exists, which should genuinely have zero build dependencies, and fallback on bundling libzmq as an Extension if libzmq is unavailable.

@ellisonbg
Copy link
Contributor

Does this cover the Windows case as well? If so, what are the build requirements on that platform?

@minrk
Copy link
Member Author

minrk commented May 18, 2012

Yes, it should work on Windows. The minimum build requirements on any platform should be: the ability to build Python C extensions.

minrk added 3 commits May 18, 2012 13:50
sometimes the name can be mangled (such as 'libzmq.cpython-32mu.so' or 'libzmq.so.1')
@minrk
Copy link
Member Author

minrk commented May 18, 2012

I've done a few tests, and have successfully run pip install http://ptsg.berkeley.edu/~minrk/pyzmq-2.2dev.tar.gz on the following systems, without libzmq available, and confirmed that all cases result in a usable pyzmq:

  • Windows 7 (x64):
    • py27-win32
    • py27-amd64
    • py32-win32
    • py32-amd64
  • OS X 10.7:
    • System Python 2.6.7 (32+64b fat intel)
    • System Python 2.7.1 (32+64b fat intel)
    • Python.org 3.2.3 (32+64b fat intel)
  • Ubuntu 12.04 (amd64):
    • Python 2.7.3
    • Python 3.2.3

The only disadvantage I can see relative to pyzmq-static is that the fallback position requires a network connection. But if you are already using pip, this seems a safe assumption.

@ellisonbg
Copy link
Contributor

Great work! This is fantastic coverage and should really help make pyzmq even easier to install.

@minrk
Copy link
Member Author

minrk commented May 19, 2012

confirmed on freebsd9-i386 (py27) as well

@gtaylor
Copy link

gtaylor commented May 22, 2012

This looks excellent. Hoping to see it land in master soon!

minrk added a commit that referenced this pull request May 24, 2012
bundle libzmq as an Extension if it isn't found

The code to do this is largely from pyzmq-static, but with some important differences:

* libzmq as an extension is *optional*
* libzmq/uuid sources are downloaded as-needed
* platform.hpp is attempted by ./configure before falling back on
  shipped versions (also from pyzmq-static)
  
This should make pyzmq pip-installable without libzmq present, and remove the need for the pyzmq-static project to exist separately from pyzmq itself.

closes #128
@minrk minrk merged commit cbb2742 into zeromq:master May 24, 2012
@minrk minrk deleted the bundle branch March 31, 2014 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make pyzmq pip-installable without libzmq present
3 participants